Remove unnecessary busy threads reading from processes stdout/stderr#1672
Remove unnecessary busy threads reading from processes stdout/stderr#1672ansys-akarcher wants to merge 1 commit intomainfrom
Conversation
|
|
||
| # Detect when server is started | ||
| if stdout_line != None and "server started" in stdout_line: | ||
| started = True |
There was a problem hiding this comment.
Yeah I was wondering about that also
I don't know if it would be possible to have "server started" and some stderr output
in this case the behavior would be different (breaking would wrongly set started as True, skipping any errors)
|
Hi @ansys-akarcher is this still ongoing work? |
|
@PProfizi the changes were insufficient, as there was also the docker context to take into account. But yeah I'd like to complete these changes at some point |
|
Hello @PProfizi! If this issue needs to remain open, please comment below with If you want this repository to be excluded from this automated maintenance process, please let us know by filling in the opt-out request form. |
this PR does not fix anything in particular.
From looking at the code it seems like, when a gRPC server is created, two threads will be started until the server dies, especially if the server startup is successful.
I think the behavior can be kept without the existence of these two threads, as the general approach is: block until the server startup is successful, or an error is detected, or server has not started and time has ran out.
Current modification do not work with server within docker context.